/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.anny.deliveryaddress.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.persistence.Page;
import com.jeeplus.core.service.CrudService;
import com.jeeplus.modules.anny.deliveryaddress.entity.AnnyDeliveryAddress;
import com.jeeplus.modules.anny.deliveryaddress.mapper.AnnyDeliveryAddressMapper;

/**
 * 收获地址管理Service
 * @author clf
 * @version 2018-10-18
 */
@Service
@Transactional(readOnly = true)
public class AnnyDeliveryAddressService extends CrudService<AnnyDeliveryAddressMapper, AnnyDeliveryAddress> {


    @Autowired
    private AnnyDeliveryAddressMapper annyDeliveryAddressMapper;



    public AnnyDeliveryAddress get(String id) {
		return super.get(id);
	}
	
	public List<AnnyDeliveryAddress> findList(AnnyDeliveryAddress annyDeliveryAddress) {
		return super.findList(annyDeliveryAddress);
	}
	
	public Page<AnnyDeliveryAddress> findPage(Page<AnnyDeliveryAddress> page, AnnyDeliveryAddress annyDeliveryAddress) {
		return super.findPage(page, annyDeliveryAddress);
	}
	
	@Transactional(readOnly = false)
	public void save(AnnyDeliveryAddress annyDeliveryAddress) {
		super.save(annyDeliveryAddress);
	}
	
	@Transactional(readOnly = false)
	public void delete(AnnyDeliveryAddress annyDeliveryAddress) {
		super.delete(annyDeliveryAddress);
	}

    @Transactional(readOnly = false)
    public boolean settingTheAddress(String id,String userid) {
        int i = annyDeliveryAddressMapper.settingTheAddress(id,userid);
        if (i > 0){
            //修改成功
            return true;
        }
        return false;
    }

}